package cn.neusoft.yuejian307.tencent;

import android.support.v7.app.AppCompatActivity;

/**
 * Created by 木子也 on 2017/11/1.
 */

public class QQTencent {
    private com.tencent.tauth.Tencent mTencent;
    private AppCompatActivity activity;

    public QQTencent(AppCompatActivity activity){
        this.activity = activity;

    }
    public void qqLogin() {  //qq第三方登录
        mTencent = com.tencent.tauth.Tencent.createInstance("1106389015", activity.getApplicationContext());//1106389015是在官网上申请的appID
        mTencent.login(activity, "all", new LoginUiListener(activity));
    }

    public void logout() { //qq登录注销
        mTencent.logout(activity);
    }
}
